package com.ericom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ericom.dao.ProductDao;
import com.ericom.model.Product;
import com.ericom.service.ProductManager;

@Service("productManager")
public class ProductManagerImpl extends GenericManagerImpl<Product, Long> implements
		ProductManager {

	ProductDao productDao;
	
	@Autowired
	public ProductManagerImpl(ProductDao productDao){
		super(productDao);
		this.productDao=productDao;
	}
	
	@Override
	public List<Product> findByCategory(Long catid) {
		return productDao.findByCategory(catid);
	}

	@Override
	public List<Product> findByOnline() {

		return productDao.findByOnline();
	}

	@Override
	public List<Product> findByOffline() {

		return productDao.findByOffline();
	}

}
